Merged
Conversation
# Conflicts: # apps/user-service/src/main/java/site/icebang/domain/workflow/service/WorkflowExecutionService.java
- 추후에 리팩토링 필요
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 작업 내용
워크플로우 실행 시 Task 간 데이터를 전달하던 기존의 인메모리(In-Memory) 컨텍스트 방식을 데이터베이스 기반의 영속적(Persistent) 컨텍스트 방식으로 변경합니다.
기존 방식은 애플리케이션 메모리에만 데이터가 존재하여, 서버 다운 시 실행 상태가 유실되고 분산 환경으로의 확장이 불가능한 문제가 있었습니다.
task_io_data테이블 활용:task_io_data테이블에 영속적으로 저장하도록WorkflowExecutionService를 수정했습니다.WorkflowContextService도입:task_run,task_io_data테이블)에서 이전 Task의 실행 결과를 조회하는 복잡한 로직을 캡슐화한WorkflowContextService를 추가했습니다.TaskBodyBuilder리팩토링:TaskBodyBuilder구현체가 인메모리Map대신,WorkflowContextService를 주입받아 이전 Task의 결과를 DB에서 조회하도록 수정했습니다.build메소드의 시그니처를(Task task, JobRun jobRun)으로 변경하여, 현재 실행중인JobRun을 기준으로 컨텍스트를 조회하도록 명확히 했습니다.✔️ 기대 효과
WorkflowContextService로 중앙화하여 코드 중복을 제거하고, 각BodyBuilder의 책임을 명확히 했습니다.🔗 관련 이슈
💬 추가 요청사항
✅ 체크리스트
코드 품질
테스트
배포 준비